# RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
# RUN:   | extract-section .text \
# RUN:   | FileCheck %s -check-prefixes=MOV8FD,MOV32FR,MOV8PD,MOV32PR,MOV8JD,MOV32JR

#------------------------------------------------------------------------------
# MxMove_MR is used for moving data from register to memory
#------------------------------------------------------------------------------

--- # ARII
#               ---------------------------+-----------+-----------+-----------
#                F   E | D   C | B   A   9 | 8   7   6 | 5   4   3 | 2   1   0
#               -------+-------+-----------+-----------+-----------+-----------
#                      |       |      DESTINATION      |         SOURCE
#                0   0 | SIZE  |    REG    |    MODE   |    MODE   |    REG
#               -------+-------+-----------+-----------+-----------+-----------
# MOV8FD:        0   0   0   1   0   0   0   1 . 1   0   0   0   0   0   0   0
# MOV8FD-SAME:   0   0   0   1   1   0   0   0 . 0   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOV8FD-SAME:   0   0   0   1   0   0   0   1 . 1   0   0   0   0   0   0   0
# MOV8FD-SAME:   0   0   0   1   1   0   0   0 . 1   1   1   1   1   1   1   1
#               ---------------------------------------------------------------
# MOV32FR-SAME:  0   0   1   0   0   0   1   1 . 1   0   0   0   0   0   0   0
# MOV32FR-SAME:  0   0   0   1   1   0   0   0 . 0   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOV32FR-SAME:  0   0   1   0   0   1   0   1 . 1   0   0   0   0   0   0   1
# MOV32FR-SAME:  1   0   1   0   1   0   0   0 . 0   0   0   0   0   0   0   0
#               ---+-----------+---+-------+---+-------------------------------
#        BRIEF  DA |    REG    | L | SCALE | 0 |          DISPLACEMENT
#               ---+-----------+---+-------+---+-------------------------------
name: MxMove_MR_ARII
body: |
  bb.0:
    MOV8fd  0,  $a0, $d1, $bd0, implicit-def $ccr
    MOV8fd  -1, $a0, $d1, $bd0, implicit-def $ccr
    MOV32fr 0,  $a1, $d1,  $d0, implicit-def $ccr
    MOV32fr 0,  $a2, $a2,  $d1, implicit-def $ccr

...
--- # ARID
#               ---------------------------+-----------+-----------+-----------
#                F   E | D   C | B   A   9 | 8   7   6 | 5   4   3 | 2   1   0
#               -------+-------+-----------+-----------+-----------+-----------
#                      |       |      DESTINATION      |         SOURCE
#                0   0 | SIZE  |    REG    |    MODE   |    MODE   |    REG
#               -------+-------+-----------+-----------+-----------+-----------
# MOV8PD-SAME:   0   0   0   1   0   0   0   1 . 0   1   0   0   0   0   0   0
# MOV8PD-SAME:   0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOV32PR-SAME:  0   0   1   0   0   0   1   1 . 0   1   0   0   0   0   0   0
# MOV32PR-SAME:  1   1   1   1   1   1   1   1 . 1   1   1   1   1   1   1   1
#               ---------------------------------------------------------------
# MOV32PR-SAME:  0   0   1   0   0   0   1   1 . 0   1   0   0   1   0   0   0
# MOV32PR-SAME:  1   1   1   1   1   1   1   1 . 1   1   1   1   1   1   1   1
name: MxMove_MR_ARID
body: |
  bb.0:
    MOV8pd  0,  $a0, $bd0, implicit-def $ccr
    MOV32pr -1, $a1,  $d0, implicit-def $ccr
    MOV32pr -1, $a1,  $a0, implicit-def $ccr

...
--- # ARI
#               ---------------------------+-----------+-----------+-----------
#                F   E | D   C | B   A   9 | 8   7   6 | 5   4   3 | 2   1   0
#               -------+-------+-----------+-----------+-----------+-----------
#                      |       |      DESTINATION      |         SOURCE
#                0   0 | SIZE  |    REG    |    MODE   |    MODE   |    REG
#               -------+-------+-----------+-----------+-----------+-----------
# MOV8JD-SAME:   0   0   0   1   0   0   0   0 . 1   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOV32JR-SAME:  0   0   1   0   0   0   1   0 . 1   0   0   0   0   0   1   1
#               ---------------------------------------------------------------
# MOV32JR-SAME:  0   0   1   0   0   0   1   0 . 1   0   0   0   1   1   0   0
name: MxMove_MR_ARI
body: |
  bb.0:
    MOV8jd  $a0, $bd0, implicit-def $ccr
    MOV32jr $a1,  $d3, implicit-def $ccr
    MOV32jr $a1,  $a4, implicit-def $ccr

...
